package com.itrip.service.impl;

import com.itrip.dao.ex.OrderMapper;
import com.itrip.dto.OrderInfoDTO;
import com.itrip.dto.OrderPayDTO;
import com.itrip.service.OrderService;
import com.itrip.vo.pay.OrderInfoVo;
import com.itrip.vo.pay.OrderPayStatusVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class OrderServiceImpl implements OrderService {

    @Resource
    private OrderMapper orderMapper;



    @Override
    public Integer CheckOrder(Long id) {
        return orderMapper.CheckOrder(id);
    }

    @Override
    public OrderPayDTO sendTradeNo(String tradeNo) {
        return orderMapper.sendTradeNo(tradeNo);
    }

    @Override
    public Integer modifyOrderStatus(OrderPayStatusVo orderPayStatusVo) {
        return orderMapper.modifyOrderStatus(orderPayStatusVo);
    }

    @Override
    public List<OrderInfoDTO> selectOrderInfo(OrderInfoVo orderInfoVo,int start) {
        return orderMapper.selectOrderInfo(orderInfoVo,start);
    }

    @Override
    public int selectCountOfOrderInfo(OrderInfoVo orderInfoVo) {
        return orderMapper.selectCountOfOrderInfo(orderInfoVo);
    }

    @Override
    public int selectOrderStatus(Long roomId) {
        return orderMapper.selectOrderStatus(roomId);
    }


    @Override
    public Integer getHotelId(Long orderNo) {
        return orderMapper.getHotelId(orderNo);
    }

    @Override
    public Integer setOrderInvalidate( String orderNo) {
        return orderMapper.setOrderInvalidate(orderNo);
    }

    @Override
    public int deleteOrder(String orderNo) {
        return orderMapper.deleteOrder(orderNo);
    }


}
